class DemoBean {
    String default_branch;
    String description;
    bool fork;
    String full_name;
    int id;
    License license;
    String name;
    String node_id;
    int open_issues_count;
    Owner owner;
    Permissions permissions;
    int watchers;

    DemoBean({this.default_branch, this.description, this.fork, this.full_name, this.id, this.license, this.name, this.node_id, this.open_issues_count, this.owner, this.permissions, this.watchers});

    factory DemoBean.fromJson(Map<String, dynamic> json) {
        return DemoBean(
            default_branch: json['default_branch'],
            description: json['description'],
            fork: json['fork'],
            full_name: json['full_name'],
            id: json['id'],
            license: json['license'] != null ? License.fromJson(json['license']) : null,
            name: json['name'],
            node_id: json['node_id'],
            open_issues_count: json['open_issues_count'],
            owner: json['owner'] != null ? Owner.fromJson(json['owner']) : null,
            permissions: json['permissions'] != null ? Permissions.fromJson(json['permissions']) : null,
            watchers: json['watchers'],
        );
    }

    Map<String, dynamic> toJson() {
        final Map<String, dynamic> data = new Map<String, dynamic>();
        data['default_branch'] = this.default_branch;
        data['description'] = this.description;
        data['fork'] = this.fork;
        data['full_name'] = this.full_name;
        data['id'] = this.id;
        data['name'] = this.name;
        data['node_id'] = this.node_id;
        data['open_issues_count'] = this.open_issues_count;
        data['watchers'] = this.watchers;
        if (this.license != null) {
            data['license'] = this.license.toJson();
        }
        if (this.owner != null) {
            data['owner'] = this.owner.toJson();
        }
        if (this.permissions != null) {
            data['permissions'] = this.permissions.toJson();
        }
        return data;
    }
}

class License {
    String key;
    String name;
    String node_id;
    String spdx_id;
    String url;

    License({this.key, this.name, this.node_id, this.spdx_id, this.url});

    factory License.fromJson(Map<String, dynamic> json) {
        return License(
            key: json['key'],
            name: json['name'],
            node_id: json['node_id'],
            spdx_id: json['spdx_id'],
            url: json['url'],
        );
    }

    Map<String, dynamic> toJson() {
        final Map<String, dynamic> data = new Map<String, dynamic>();
        data['key'] = this.key;
        data['name'] = this.name;
        data['node_id'] = this.node_id;
        data['spdx_id'] = this.spdx_id;
        data['url'] = this.url;
        return data;
    }
}

class Owner {
    int id;
    String login;
    bool site_admin;

    Owner({this.id, this.login, this.site_admin});

    factory Owner.fromJson(Map<String, dynamic> json) {
        return Owner(
            id: json['id'],
            login: json['login'],
            site_admin: json['site_admin'],
        );
    }

    Map<String, dynamic> toJson() {
        final Map<String, dynamic> data = new Map<String, dynamic>();
        data['id'] = this.id;
        data['login'] = this.login;
        data['site_admin'] = this.site_admin;
        return data;
    }
}

class Permissions {
    bool admin;
    bool pull;
    bool push;

    Permissions({this.admin, this.pull, this.push});

    factory Permissions.fromJson(Map<String, dynamic> json) {
        return Permissions(
            admin: json['admin'],
            pull: json['pull'],
            push: json['push'],
        );
    }

    Map<String, dynamic> toJson() {
        final Map<String, dynamic> data = new Map<String, dynamic>();
        data['admin'] = this.admin;
        data['pull'] = this.pull;
        data['push'] = this.push;
        return data;
    }
}